package pa2.system;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.Map;
import pa2.util.Callback;
import pa2.util.CompInteger;
import pa2.util.EqualityCompare;


public interface SystemManager <K extends EqualityCompare<K>, V, M extends Map<K,V>> extends Remote {
	
    /**
     * Returns the service name.
     *
     * @return the service name.
     */
    public final String SERVICENAME = "dht.SystemManager";
    
    public void registerPeer(Peer peer) throws RemoteException;
    
    public void unregisterPeer(Peer peer) throws RemoteException;     

	void put(CompInteger key, String value, Callback<CompInteger, String> callback) throws RemoteException;
	void get(CompInteger key, Callback<CompInteger, String> callback) throws RemoteException;
	void remove(CompInteger key, Callback<CompInteger, String> callback) throws RemoteException;

}
